function clicked(id) {
    let element = document.getElementById(id);
    let attribute = element.getAttribute("style");
    if (attribute && attribute.indexOf("display:block") >= 0) {
        element.setAttribute("style", "display:none");
    } else {
        element.setAttribute("style", "display:block");
    }
}

function show(i) {
    let elements = document.getElementsByTagName("ul");
    for (let j = 0; j < elements.length; j++) {
        let element = elements[j];
        if (i == 1) {
            element.setAttribute("style", "display:block");
        } else if (i == 0) {
            element.setAttribute("style", "display:none");
        }
    }
    if (i == 2) {
        elements[elements.length - 1].setAttribute("style", "display:block");
    }
}

show(2);